/*
This file contains some global variables declarations and global functions
that are common to many files in this project. 

Copyright (C) 2018  Denis Pankratov

Modifications Copyright (C) 2019 Christodoulos Karavasilis

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include <random>
#include <vector>
#include <set>
#include <cmath>
using namespace std;

#define DEBUG_LEVEL 0

extern random_device rd;
extern mt19937 rng;
extern uniform_real_distribution<double> rand_frac;
extern random_device rd2;
extern mt19937 rng2;


/* Prints the matching for debug purposes. */
void printMatch(vector<int> & online);

/*
Writes a sample mean into the mean variable and the unbiased estimator for
the sample standard deviation into std variable. If the number of samples is 1 
or less, writes -1 into both variables.
*/
void getMeanAndStd(const vector<double> &vec, double & mean, double &std);